package com.zhejiangzhengyuan.municipal_common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhejiangzhengyuan.municipal_common.entity.ElectronicData;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/*
 *
 * @author linju
 * @since 2020-01-07
 */
@Repository
public interface ElectronicDataMapper extends BaseMapper<ElectronicData> {

    Integer getWaterValueByDeviceCode(
            @Param("deviceCode") String deviceCode,
            @Param("startTimestamp") String startTimestamp,
            @Param("endTimestamp") String endTimestamp);

    @Select("select * from electronic_data")
    Page<ElectronicData> selectElectronicData(Page<ElectronicData> electronicDataPage);

    Page<ElectronicData> fuzzyElectronicData(Page<ElectronicData> electronicDataPage,
                                             @Param("eName") String name,
                                             @Param("startTimestamp") String startTimestamp,
                                             @Param("endTimestamp") String endTimestamp);
}
